package com.ctshk.app.scenic.controller;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.AppReq;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.utils.thirdparty.airshowResp.AirshowSceneResp;
import com.ctshk.common.utils.thirdparty.airshowResp.AirshowTicketResp;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.scenic.dto.AirshowProductDTO;
import com.ctshk.rpc.scenic.dto.app.ScenicProductIndexDTO;
import com.ctshk.rpc.scenic.dto.app.inner.ScenicTicketListDTO;
import com.ctshk.rpc.scenic.req.AirshowProductListReq;
import com.ctshk.rpc.scenic.req.TicketRecommendReq;
import com.ctshk.rpc.scenic.service.app.IAirshowAppService;
import com.ctshk.rpc.scenic.service.app.IScenicProductPCService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(value = "航展C端产品相关接口", tags = "航展C端产品相关接口")
@RequestMapping("/airshow")
public class AirshowProductController extends BaseController {

    @DubboReference
    private IAirshowAppService iAirshowAppService;

    @GetMapping("/get-scene")
    @ApiOperation(value = "查询航展场次", notes = "查询航展场次")
    public Result<List<AirshowSceneResp>> getScene(){
        return iAirshowAppService.getScene();
    }

    @PostMapping("/get-ticket-by-scene-id")
    @ApiOperation(value = "查询航展门票", notes = "查询航展门票")
    public Result<List<AirshowTicketResp>> getTicketBySceneId(Long sceneId) {
        return iAirshowAppService.getTicketBySceneId(sceneId);
    }

    @PostMapping("/get-package-product-list")
    @ApiOperation(value = "查询套票产品列表", notes = "查询航展门票")
    public PageResponse<AirshowProductDTO> getPackageProductListByParams(@RequestBody AirshowProductListReq req) {
        return iAirshowAppService.getPackageProductListByParams(req);
    }
}
